package com.fishery.processing.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author run
 * @since 2021-03-12
 */
@TableName("t_processing_product_batch")
@ApiModel(value="TProcessingProductBatch对象", description="产品批次表")
public class ProductBatch implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "产品批次id", hidden = true)
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "所属作业id")
    private String jobId;

    @ApiModelProperty(value = "剩余重量 /kg")
    private Double weight;

    @ApiModelProperty(value = "所属加工厂id")
    private String processingFactoryId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ApiModelProperty(value = "逻辑删除")
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "乐观锁")
    @TableField(fill = FieldFill.INSERT)
    @Version
    private Integer version;

    public ProductBatch(String jobId, Double weight, String processingFactoryId) {
        this.jobId = jobId;
        this.weight = weight;
        this.processingFactoryId = processingFactoryId;
    }

    public ProductBatch() {
    }

    public String getProcessingFactoryId() {
        return processingFactoryId;
    }

    public void setProcessingFactoryId(String processingFactoryId) {
        this.processingFactoryId = processingFactoryId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getJobId() {
        return jobId;
    }

    public Double getWeight() {
        return weight;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "ProductBatch{" +
        "id=" + id +
        ", jobId=" + jobId +
        ", weight=" + weight +
        ", gmtCreate=" + gmtCreate +
        ", gmtModified=" + gmtModified +
        ", isDeleted=" + isDeleted +
        ", version=" + version +
        "}";
    }
}
